<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <?php $this->load->view('header/css.php'); ?>
    <link rel="stylesheet" href="<?php echo base_url(); ?>css/jquery.pnotify.css" type="text/css" media="screen, projection" />
    
    <?php $this->load->view('header/js.php'); ?>
    <script type="text/javascript" src="<?php echo base_url().'js/jquery.pnotify.js'?>"></script>
    <script type="text/javascript">
        $(function() {
            $("#datepicker").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c-100:c'
            });
        });

        $(document).ready(function() {
            $('#error-container').hide();
            var elems = $('#error-container ul').clone();
            $.each(elems, function(i, e) {
                //$(e).css('list-style-type', 'none');
            });

           //var c = $(elems).wrapAll('<ul>');
           elems.removeClass('prepend-1');
           elems.removeClass('span-15');
            
            //console.log(elems);
            if (elems.length > 0) {
	            $.pnotify({ 
	            	pnotify_title: "Errors found",
		            pnotify_text: elems, 
		            pnotify_type: 'error', 
		            pnotify_hide: false 
		        });
	            $('.ui-pnotify-text').show();
            }

            $('#info-container').hide();
            var elems = $('#info-container ul').clone();
            elems.removeClass('prepend-1');
            elems.removeClass('span-15');
            
            //console.log(elems);
            if (elems.length > 0) {
                $.pnotify({
                    pnotify_title: 'Information',
                    pnotify_text: elems,
                    pnotify_type: 'info', 
                });
                $('.ui-pnotify-text').show();
            }
        });
    </script>
    <title><?=lang('login.Login')?></title>
</head>
<body>
    <div id="page">
        <div id="header" class="clearfix">
                <div id="headerimg">
                    <div  class="container" style="text-align: right">
                        <span class="span-2"><img src="/images/favl_logo_small.gif" style="margin-top: -5px" /></span>
                        <h1><?=lang('login.Login')?></h1>
                    </div>
                </div>
            <div id="navigation">
                <div class="container">
                    <ul id="nav">
                        <li class="active"><a href="/"><?=lang('login.Welcome')?></a> &nbsp; // &nbsp; </li>
                        <li><a href="http://www.favl.org.ar">FAVL</a></li>
                    </ul>
                </div>
            </div>
        </div><!-- /#header -->
        <div id="main">
            <div class="container">
                <div class="span-17 colborder last" id="content">
                    <?php if (isset($messages)) echo $messages; ?>
                    <div id="login-form" class="span-5 last">
					   <?php echo form_open('login/email'); ?>
                        <p>
                            <label for="username"><?=lang('login.EMail')?>: </label> 
                            <?php echo form_input('email',set_value('email')); ?>
						</p>
						<p>
                            <label for="password"><?=lang('login.Password')?>: </label> <?php echo form_password('password'); ?>
						</p>
						<hr />
                       <p><?php echo form_submit('action', lang('login.Login')); ?></p>
					   <?php echo form_close(); ?>
                    </div>
                </div> <!-- end content -->
                <div class="span-6 prepend-1 last" id="sidebar">
                    <div class="box">
                        <h3 class="caps"><?=lang('login.Login')?></h3>
                        <p><?php echo anchor('signup',lang('login.Register')); ?></p>
                        <p><?php echo anchor('welcome',lang('login.Welcome')); ?></p>
                   </div>
               </div>
            </div> <!-- end container -->
        </div> <!-- end main -->
    </div> <!-- end page -->
</body>
</html>
